﻿using System.Web;

namespace HoverTree.HoverTreeFrame
{
    public class RequestHelper
    {
       public static int GetQueryInt(string strName, int defValue)
       {
           return Utils.StrToInt(HttpContext.Current.Request.QueryString[strName], defValue);
       }

        public static string GetQueryString(string strName, string defValue)
        {
            string m_string = HttpContext.Current.Request.QueryString[strName];
            if (string.IsNullOrEmpty(m_string))
                return defValue;
            else
                return m_string;
        }

        public static string GetQueryString(string strName)
        {
            return GetQueryString(strName, "");
        }
    }
}